package com.colin.controller;

import com.colin.pojo.Users;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
public class IndexController {
    @RequestMapping("/")
    public String index(Model model , HttpSession session){
        Object username = session.getAttribute("userInfo");
        model.addAttribute("user" , username);
        return "index";
    }
}
